package com.sinodata.bsm.center.engine.event.correlation;

import com.sinodata.bsm.center.engine.event.EventWorker;
import com.sinodata.bsm.common.constants.EventConstants;
import com.sinodata.bsm.common.vo.Event;

/**
 * 
 * <p>
 * Description: 事件关联流处理器 
 * </p>
 *
 * @author liulibo
 * @version 1.0

 * <p>
 * History: 
 *
 * Date                     Author         Version     Description
 * ---------------------------------------------------------------------------------
 * 2012-6-11 PM 3:25:04     liulibo        1.0         To create
 * </p>
 *
 * @since 
 * @see
 */
public class EventCorrelationWorker implements EventWorker {

    public EventCorrelationWorker() {

    }

    /*
     * (non-Javadoc)
     * @see com.sinodata.bsm.center.engine.event.EventWorker#execute(com.sinodata.bsm.common.vo.Event)
     */
    @Override
    public void execute(Event event) {
        //故障类事件，并且必须不是已清除事件，进入事件关联处理
        if (event.getCatalog() == EventConstants.CATALOG_FAULTEVENT && event.getStatus() != EventConstants.STATUS_CONFIRMED) {
            EventCorrelationManager.getInstance().processEvent(event);
        }
    }
}